package com.guangyuan.network.dao;

import com.guangyuan.network.dao.interfaces.DefaultDao;
import com.guangyuan.network.dao.interfaces.ProductGroupDao;
import com.guangyuan.network.dao.jdbc.impl.DefaultDaoImpl;
import com.guangyuan.network.dao.jdbc.impl.ProductGroupDaoImp;

public class DBFactory {
	private static ProductGroupDao productGroupDao;
	private static DefaultDao defaultDao;

	public static ProductGroupDao getProductDao() {
		if (null == productGroupDao) {
			productGroupDao = new ProductGroupDaoImp();
		}
		return productGroupDao;
	}
	
	public static DefaultDao getDefaultDao() {
		if(null == defaultDao) {
			defaultDao = new DefaultDaoImpl();
		}
		
		return defaultDao;
	}
}
